package net.csdra.DongPoShuZiTuShuGuan.service;

import net.csdra.DongPoShuZiTuShuGuan.domain.ExternalLink;
import org.springframework.data.domain.Page;

/**
 * Created by add on 2018/1/16.
 */
public interface ExternalLinkManagerService {
    //获取链接详情
    ExternalLink getExternalLinkInfo(GetExternalLinkInfo getExternalLinkInfo);

    //修改链接
    ExternalLink upadteExternalLink(UpadteExternalLink upadteExternalLink);

    //删除链接
    void deleteExternalLink(DeleteExternalLink deleteExternalLink);

    //创建链接
    ExternalLink createExternalLink(CreateExternalLink createExternalLink);

    //获取根据MetaId获取外部链接
    Page<ExternalLink> getExternalLinks(GetExternalLinks getExternalLinks);

    class GetExternalLinkInfo {
        private String id;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }
    }

    class UpadteExternalLink extends CreateExternalLink {
        private String id;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }
    }

    class DeleteExternalLink {
        private String externalLinkId;

        public String getExternalLinkId() {
            return externalLinkId;
        }

        public void setExternalLinkId(String externalLinkId) {
            this.externalLinkId = externalLinkId;
        }
    }

    class CreateExternalLink {
        //        资源名称
        private String resourcesName;
        //        资源链接
        private String targetUrl;
        //        展示顺序
        private int viewOrder;
        //        详情
        private String info;
        //        父级
        private String metaId;

        public String getMetaId() {
            return metaId;
        }

        public void setMetaId(String metaId) {
            this.metaId = metaId;
        }

        public String getResourcesName() {
            return resourcesName;
        }

        public void setResourcesName(String resourcesName) {
            this.resourcesName = resourcesName;
        }

        public String getTargetUrl() {
            return targetUrl;
        }

        public void setTargetUrl(String targetUrl) {
            this.targetUrl = targetUrl;
        }

        public int getViewOrder() {
            return viewOrder;
        }

        public void setViewOrder(int viewOrder) {
            this.viewOrder = viewOrder;
        }

        public String getInfo() {
            return info;
        }

        public void setInfo(String info) {
            this.info = info;
        }
    }

    class GetExternalLinks extends PageEntity{
        private String metaId;

        public String getMetaId() {
            return metaId;
        }

        public void setMetaId(String metaId) {
            this.metaId = metaId;
        }
    }
}
